import React, { useState } from 'react'
import { NavLink, Outlet } from 'react-router-dom'
import './resource.scss'


const Resource=()=> {
    const [reHead]=useState([{
        name:'销售楼盘',
        path:'/resource/sale',
    },{
        name:'房屋租赁',
        path:'/resource/lease',
    }])
    
    return (
        <div>
            <p className='header_title'>房源管理</p>
            <div className="re_head">
                {
                    reHead.map(item=>{
                        return <NavLink key={item.path} to={item.path}>{item.name}</NavLink>
                    })
                }
            </div>
            <div className="re_con">
                {/* 三级路由出口 */}
                <Outlet />
            </div>
        </div>
    )
}

export default Resource
